+2008-02-12 Michael Natterer <mitch@imendio.com>
+
+ * gtk/gtkwindow.c (gtk_window_activate_key): simply use
+ gtk_window_get_key_hash() to get the hash instead of manually
+ fiddling with quarks and gtk_window_keys_changed(). Also add
+ g_return_if_fail() to this public function.
+
2008-02-11 Matthias Clasen <mclasen@redhat.com>
Support keynav in status icons. (#473786, Li Yuan)
* called by the default ::key_press_event handler for toplevel windows,
* however in some cases it may be useful to call this directly when
* overriding the standard key handling for a toplevel window.
- *
+ *
* Return value: %TRUE if a mnemonic or accelerator was found and activated.
**/
gboolean
gtk_window_activate_key (GtkWindow *window,
GdkEventKey *event)
{
- GtkKeyHash *key_hash = g_object_get_qdata (G_OBJECT (window), quark_gtk_window_key_hash);
+ GtkKeyHash *key_hash;
GtkWindowKeyEntry *found_entry = NULL;
- if (!key_hash)
- {
- gtk_window_keys_changed (window);
- key_hash = g_object_get_qdata (G_OBJECT (window), quark_gtk_window_key_hash);
- }
-
+ g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
+ g_return_val_if_fail (event != NULL, FALSE);
+
+ key_hash = gtk_window_get_key_hash (window);
+
if (key_hash)
{
GSList *entries = _gtk_key_hash_lookup (key_hash,